package com.game.worm.mobile.view.tags;

import android.os.Bundle;
import android.widget.LinearLayout;
import com.dx.as.UI;
import com.dx.as.http.IHttpListener;
import com.game.worm.mobile.R;
import com.game.worm.mobile.view.http.HttpHelper;
import com.game.worm.mobile.view.tags.bean.TagBean;

import java.util.List;

/**
 * Created by d_xxiang on 2018/5/22.
 */

public class TagsActivity extends UI{
    private LinearLayout container;
    @Override
    protected void onActivityCreate(Bundle savedInstanceState) {
        setContentView(R.layout.activity_tags);
        initView();
        doHttp();
    }

    private void initView(){
        container = findView(R.id.container);
    }


    private void doHttp(){
        HttpHelper.getTagsList(iHttpListener);
    }

    private IHttpListener iHttpListener = new IHttpListener() {
        @Override
        public void onFilure(int code, String errorMsg) {
        }

        @Override
        public void onResponse(Object response, int flg) {
            if (response != null){
                List<TagBean> tags = (List<TagBean>)response;
                splitList(tags);
            }
        }

        @Override
        public void onFailure(Throwable t) {
        }
    };

    private void splitList(List<TagBean> tags){
//        TagHelper tagHelper = new TagHelper();
//        tagHelper.setData(tags);
    }


}
